/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SPARQL;

import java.util.Objects;

/**
 *
 * @author riccardo
 */
public class Literal implements Obje,Constant{
    private String literal;

    public Literal(String literal) {
        this.literal = literal;
    }

    public String getLiteral() {
        return literal;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 79 * hash + Objects.hashCode(this.literal);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Literal other = (Literal) obj;
        if (!Objects.equals(this.literal, other.literal)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return  literal;
    }

    
    @Override
    public Object clone(){
        return new Literal(literal); //To change body of generated methods, choose Tools | Templates.
    }
    
    
}
